<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<script type="text/javascript">
    /**
     * 会员余额提现详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/customer/drawing/getDrawingObject.sjson",
            data: {drawingId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                if(data != null){
                    $("#d_customerName").html(data.customerName);/** 会员ID **/
                    $("#d_drawingCode").html(data.drawing.drawingCode);/** 提现编号 **/
                    $("#d_phone").html(data.drawing.phone);/** 联系电话 **/
                    $("#d_bankName").html(data.drawing.bankName);/** 银行名称 **/
                    $("#d_bankAddre").html(data.drawing.bankAddre);/** 银行地址 **/
                    $("#d_cardNum").html(data.drawing.cardNum);/** 卡号 **/
                    $("#d_realName").html(data.drawing.realName);/** 真实姓名 **/
                    if(data.drawing.createTime!=""&&data.drawing.createTime!=undefined){
                        $("#d_createTime").html(new Date(data.drawing.createTime).Format("yyyy-MM-dd hh:mm:ss"));
                    }
                    if(data.drawing.updateTime!=undefined&&data.drawing.updateTime!=""){
                        $("#d_updateTime").html(new Date(data.drawing.updateTime).Format("yyyy-MM-dd hh:mm:ss"));/** 发放时间 **/
                    }else{
                        $("#d_updateTime").html("未发放");/** 发放时间 **/
                    }
                    if(data.drawing.updateUserId!=undefined&&data.drawing.updateUserId!=""){
                        $("#d_userName").html(data.userName);/** 发放人ID **/
                    }else{
                        $("#d_userName").html("未发放");/** 发放人ID **/
                    }
                    if(data.drawing.remarks!=undefined&&data.drawing.remarks!=""){
                        $("#d_remarks").html(data.drawing.remarks);/** 备注 **/
                    }else{
                        $("#d_remarks").html("无");/** 备注 **/
                    }
                    $("#d_drawingAmount").html(data.drawing.drawingAmount);/** 提现金额 **/
                    if(data.drawing.state==1){/** 状态 1、已提交  2、已审核  3、已发放 **/
                        $("#d_state").html("<font class='color_002'>已提交</font>");
                    }else if(data.drawing.state==2){
                        $("#d_state").html("<font class='color_003'>已审核</font>");
                    }else if(data.drawing.state==3){
                        $("#d_state").html("<font class='color_001'>已发放</font>");
                    }
                }
            }
        });
    }
</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">会员余额提现详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">会员名称:</td><td  class="toleft_td"  width="250px">&nbsp;&nbsp;<span id="d_customerName"></span></td>
						<td class="toright_td" width="150px">真实姓名:</td><td  class="toleft_td"  width="250px" >&nbsp;&nbsp;<span id="d_realName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">提现编号:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_drawingCode"></span></td>
						<td class="toright_td" width="150px">联系电话:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_phone"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">银行名称:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_bankName"></span></td>
						<td class="toright_td" width="150px">银行地址:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_bankAddre"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">卡号:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_cardNum"></span></td>
						<td class="toright_td" width="150px">申请时间:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_createTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">发放时间:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_updateTime"></span></td>
						<td class="toright_td" width="150px">发放人:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_userName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">状态:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_state"></span></td>
						<td class="toright_td" width="150px">提现金额:</td><td  class="toleft_td"  >&nbsp;&nbsp;<span id="d_drawingAmount"></span>元</td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">备注:</td><td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<span id="d_remarks"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
